<html>
<head>
</head>
<body>
<script>
  var gui = require('nw.gui');

</script>

<div>
	<h2>web site</h2>
    <a href="http://html5test.com">html5test</a>
    <span>should bigger than 445</span>
</div>

<div>
    <a href="http://get.webgl.org">WebGL</a>
</div>

<div>
    <a href="https://apprtc.appspot.com">WebRTC</a>
</div>

<div>
    <a href="mailto:owenc4a4@gmail.com?subject=new work&body=Hello I am cloud.">mailto</a>
</div>

<div>
	<h2>file dialog</h2>

	<div><p>nwworkingdir(C:\Windows or /usr/):</p>    
      <input name='file' type="file"/> <br/>
    </div>
	
  <div><p>nwworkingdir(C:\Users or /home) with nwdirectory: </p>
    <input name='file' type="file" nwdirectory/> <br/>
  </div>
  
  <div><p>nwworkingdir(C:\Users\Public or /sys) with webkitdirectory: </p>
  <input name='file' type="file" webkitdirectory/> <br/>
  </div>
  
  <div><p>nwworkingdir(C:\Windows or /usr/local) with multiple: </p>
  <input name='file' type="file" multiple/> <br/>
  </div>
	<script>
    var dir_win = ["C:\\Windows", 'C:\\Users', 'C:\\Users\\Public', 'C:\\Windows'];
    var dir_unix = ["/usr/", '/home', '/sys', '/usr/local'];
    var list = document.getElementsByName('file');
    for (var i = 0; i < list.length; i++) {
      if (process.platform == 'win32') {
    	  list[i].nwworkingdir = dir_win[i];
      } else {
      	list[i].nwworkingdir = dir_unix[i];
      }
    }
	</script>
</div>
</body>
</html>
